#include "noderecord.h"

NodeRecord::NodeRecord() : costSoFar_(0), estimatedCosts_(0), node_(0), connection_(NULL)
{

}

NodeRecord::~NodeRecord()
{

}
void NodeRecord::setCostSoFar(const double cost)
{
	costSoFar_ += cost;
}

double NodeRecord::getCostSoFar() const
{
	return costSoFar_;
}

void NodeRecord::setEstimatedCost(const double cost)
{
	estimatedCosts_ = cost;
}

double NodeRecord::getEstimatedCost() const
{
	return estimatedCosts_;
}

uint32 NodeRecord::getNode() const
{
	return node_;
}

void NodeRecord::setNode(uint32 node)
{
	node_ = node;
}

void NodeRecord::setConnection(Connection* connection)
{
	connection_= connection;
}

Connection* NodeRecord::getConnection() const
{
	return connection_;
}

bool NodeRecord::operator>(const NodeRecord& right) const
{
	return estimatedCosts_ > right.getEstimatedCost();
}

bool NodeRecord::operator<(const NodeRecord& right) const
{
	return estimatedCosts_ < right.getEstimatedCost();
}
